package com.alks.function.mapper.procurement;


import com.alks.entity.data.entity.PcPackDetail;
import com.alks.function.data.dto.procurement.InstructionPackageDetailsDto;
import com.alks.function.data.dto.procurement.InstructionPackageDto;
import com.alks.function.data.request.procurement.InstructionPackageMaterialRequest;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface InstructionPackagingMaterialMapper {

     /*待计算指令查询*/
     List<InstructionPackageDto> getNotCountLotNoList(@Param("request") InstructionPackageMaterialRequest request, @Param("companyId") String companyId);

     /*已处理指令查询*/
     List<InstructionPackageDto> getProcessedLotNoList(@Param("request") InstructionPackageMaterialRequest request, @Param("companyId") String companyId);
     List<InstructionPackageDto> getProcessedLotNoList2(@Param("request") InstructionPackageMaterialRequest request, @Param("companyId") String companyId);

     /*指令包材明细：查询*/
     List<InstructionPackageDetailsDto> getInstructionPackageDetails(@Param("request") InstructionPackageMaterialRequest request, @Param("companyId") String companyId);

     /*批量指令包材明细：查询*/
    List<InstructionPackageDetailsDto> getBatchInstructionPackageDetails(@Param("lotNoList") List<InstructionPackageMaterialRequest> lotNoList, @Param("companyId") String companyId);

    /*批量指令包材明细：箱数查询*/
    List<InstructionPackageDto> getDetailList(@Param("lotNoList") List<String> list, @Param("companyId") String companyId);

    /*指令包材明细：添加*/
    int addInstructionPackageDetails(PcPackDetail pcPackDetail);

    /*指令包材明细：编辑*/
     int updateInstructionPackageDetails(@Param("request") PcPackDetail pcPackDetail);

    /*指令包材明细： 批量编辑*/
    int updateBatchInstructionPackageDetails(List<PcPackDetail> list);

     /*指令包材明细全删*/
    int deleteAllInstructionPackage(@Param("request") PcPackDetail pcPackDetail);

    /*指令包材明细单条删*/
    int deleteInstructionPackageDetails(@Param("request") List<PcPackDetail> details);

    /*批量添加指令包材明细*/
    int addInstructionPackage(@Param("list") List<PcPackDetail> list);

    /*先查包材明细的鞋托数据*/
    List<PcPackDetail> getPackageDetailsOfShoes(String lotNo, String companyId);

    /*查包材明细的鞋托数据（已经入库或者下单的）*/
    List<InstructionPackageDetailsDto> getPackageDetailsOfShoes2(String lotNo, String companyId);

    /*先删掉改指令现有鞋托数据*/
    int deleteInstructionPackageDetailsByLotNo(String lotNo, String companyId);

    /*更新用量*/
    int updateInstructionPackage(@Param("list") List<PcPackDetail> addList);

    /*根据材料删除数据*/
    int deleteInstructionPackage(@Param("list") List<PcPackDetail> deleteList);

    /*删除所有鞋托*/
    int deleteByXieTuo(String lotNo, String companyId);
}
